3.1.17 \(\int \text {csch}^3(c+d x) (a+b \sinh ^2(c+d x))^2 \, dx\) [17]

Optimal. Leaf size=56 \[ \frac {a (a-4 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}+\frac {b^2 \cosh (c+d x)}{d}-\frac {a^2 \coth (c+d x) \text {csch}(c+d x)}{2 d} \]

[Out]

1/2*a*(a-4*b)*arctanh(cosh(d*x+c))/d+b^2*cosh(d*x+c)/d-1/2*a^2*coth(d*x+c)*csch(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3265, 398, 393, 212} \begin {gather*} -\frac {a^2 \coth (c+d x) \text {csch}(c+d x)}{2 d}+\frac {a (a-4 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}+\frac {b^2 \cosh (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csch[c + d*x]^3*(a + b*Sinh[c + d*x]^2)^2,x]

[Out]

(a*(a - 4*b)*ArcTanh[Cosh[c + d*x]])/(2*d) + (b^2*Cosh[c + d*x])/d - (a^2*Coth[c + d*x]*Csch[c + d*x])/(2*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \text {csch}^3(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a-b+b x^2\right )^2}{\left (1-x^2\right )^2} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (b^2+\frac {a (a-2 b)+2 a b x^2}{\left (1-x^2\right )^2}\right ) \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {b^2 \cosh (c+d x)}{d}+\frac {\text {Subst}\left (\int \frac {a (a-2 b)+2 a b x^2}{\left (1-x^2\right )^2} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {b^2 \cosh (c+d x)}{d}-\frac {a^2 \coth (c+d x) \text {csch}(c+d x)}{2 d}+\frac {(a (a-4 b)) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cosh (c+d x)\right )}{2 d}\\ &=\frac {a (a-4 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}+\frac {b^2 \cosh (c+d x)}{d}-\frac {a^2 \coth (c+d x) \text {csch}(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(134\) vs. \(2(56)=112\).
time = 0.05, size = 134, normalized size = 2.39 \begin {gather*} \frac {b^2 \cosh (c) \cosh (d x)}{d}-\frac {a^2 \text {csch}^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {2 a b \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {2 a b \log \left (\sinh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a^2 \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a^2 \text {sech}^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {b^2 \sinh (c) \sinh (d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csch[c + d*x]^3*(a + b*Sinh[c + d*x]^2)^2,x]

[Out]

(b^2*Cosh[c]*Cosh[d*x])/d - (a^2*Csch[(c + d*x)/2]^2)/(8*d) - (2*a*b*Log[Cosh[c/2 + (d*x)/2]])/d + (2*a*b*Log[
Sinh[c/2 + (d*x)/2]])/d - (a^2*Log[Tanh[(c + d*x)/2]])/(2*d) - (a^2*Sech[(c + d*x)/2]^2)/(8*d) + (b^2*Sinh[c]*
Sinh[d*x])/d

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(136\) vs. \(2(52)=104\).
time = 1.41, size = 137, normalized size = 2.45

method result size
risch \(\frac {{\mathrm e}^{d x +c} b^{2}}{2 d}+\frac {{\mathrm e}^{-d x -c} b^{2}}{2 d}-\frac {a^{2} {\mathrm e}^{d x +c} \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}-1\right )}{2 d}+\frac {2 a \ln \left ({\mathrm e}^{d x +c}-1\right ) b}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}+1\right )}{2 d}-\frac {2 a \ln \left ({\mathrm e}^{d x +c}+1\right ) b}{d}\) \(137\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(d*x+c)^3*(a+b*sinh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/2/d*exp(d*x+c)*b^2+1/2/d*exp(-d*x-c)*b^2-a^2*exp(d*x+c)*(1+exp(2*d*x+2*c))/d/(exp(2*d*x+2*c)-1)^2-1/2*a^2/d*
ln(exp(d*x+c)-1)+2*a/d*ln(exp(d*x+c)-1)*b+1/2*a^2/d*ln(exp(d*x+c)+1)-2*a/d*ln(exp(d*x+c)+1)*b

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 157 vs. \(2 (52) = 104\).
time = 0.27, size = 157, normalized size = 2.80 \begin {gather*} \frac {1}{2} \, b^{2} {\left (\frac {e^{\left (d x + c\right )}}{d} + \frac {e^{\left (-d x - c\right )}}{d}\right )} + \frac {1}{2} \, a^{2} {\left (\frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} - \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {2 \, {\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )}}\right )} - 2 \, a b {\left (\frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} - \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*sinh(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/2*b^2*(e^(d*x + c)/d + e^(-d*x - c)/d) + 1/2*a^2*(log(e^(-d*x - c) + 1)/d - log(e^(-d*x - c) - 1)/d + 2*(e^(
-d*x - c) + e^(-3*d*x - 3*c))/(d*(2*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c) - 1))) - 2*a*b*(log(e^(-d*x - c) + 1)/
d - log(e^(-d*x - c) - 1)/d)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 902 vs. \(2 (52) = 104\).
time = 0.40, size = 902, normalized size = 16.11 \begin {gather*} \frac {b^{2} \cosh \left (d x + c\right )^{6} + 6 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + b^{2} \sinh \left (d x + c\right )^{6} - {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{4} + {\left (15 \, b^{2} \cosh \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2}\right )} \sinh \left (d x + c\right )^{4} + 4 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{3} - {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} - {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{2} + {\left (15 \, b^{2} \cosh \left (d x + c\right )^{4} - 6 \, {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2}\right )} \sinh \left (d x + c\right )^{2} + b^{2} + {\left ({\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{5} + 5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + {\left (a^{2} - 4 \, a b\right )} \sinh \left (d x + c\right )^{5} - 2 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{2} - a^{2} + 4 \, a b\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{3} - 3 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right ) + {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{4} - 6 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{2} + a^{2} - 4 \, a b\right )} \sinh \left (d x + c\right )\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) - {\left ({\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{5} + 5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + {\left (a^{2} - 4 \, a b\right )} \sinh \left (d x + c\right )^{5} - 2 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{2} - a^{2} + 4 \, a b\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{3} - 3 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right ) + {\left (5 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{4} - 6 \, {\left (a^{2} - 4 \, a b\right )} \cosh \left (d x + c\right )^{2} + a^{2} - 4 \, a b\right )} \sinh \left (d x + c\right )\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{5} - 2 \, {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{3} - {\left (2 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \, {\left (d \cosh \left (d x + c\right )^{5} + 5 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + d \sinh \left (d x + c\right )^{5} - 2 \, d \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{2} - d\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{3} - 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + d \cosh \left (d x + c\right ) + {\left (5 \, d \cosh \left (d x + c\right )^{4} - 6 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*sinh(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/2*(b^2*cosh(d*x + c)^6 + 6*b^2*cosh(d*x + c)*sinh(d*x + c)^5 + b^2*sinh(d*x + c)^6 - (2*a^2 + b^2)*cosh(d*x
+ c)^4 + (15*b^2*cosh(d*x + c)^2 - 2*a^2 - b^2)*sinh(d*x + c)^4 + 4*(5*b^2*cosh(d*x + c)^3 - (2*a^2 + b^2)*cos
h(d*x + c))*sinh(d*x + c)^3 - (2*a^2 + b^2)*cosh(d*x + c)^2 + (15*b^2*cosh(d*x + c)^4 - 6*(2*a^2 + b^2)*cosh(d
*x + c)^2 - 2*a^2 - b^2)*sinh(d*x + c)^2 + b^2 + ((a^2 - 4*a*b)*cosh(d*x + c)^5 + 5*(a^2 - 4*a*b)*cosh(d*x + c
)*sinh(d*x + c)^4 + (a^2 - 4*a*b)*sinh(d*x + c)^5 - 2*(a^2 - 4*a*b)*cosh(d*x + c)^3 + 2*(5*(a^2 - 4*a*b)*cosh(
d*x + c)^2 - a^2 + 4*a*b)*sinh(d*x + c)^3 + 2*(5*(a^2 - 4*a*b)*cosh(d*x + c)^3 - 3*(a^2 - 4*a*b)*cosh(d*x + c)
)*sinh(d*x + c)^2 + (a^2 - 4*a*b)*cosh(d*x + c) + (5*(a^2 - 4*a*b)*cosh(d*x + c)^4 - 6*(a^2 - 4*a*b)*cosh(d*x
+ c)^2 + a^2 - 4*a*b)*sinh(d*x + c))*log(cosh(d*x + c) + sinh(d*x + c) + 1) - ((a^2 - 4*a*b)*cosh(d*x + c)^5 +
 5*(a^2 - 4*a*b)*cosh(d*x + c)*sinh(d*x + c)^4 + (a^2 - 4*a*b)*sinh(d*x + c)^5 - 2*(a^2 - 4*a*b)*cosh(d*x + c)
^3 + 2*(5*(a^2 - 4*a*b)*cosh(d*x + c)^2 - a^2 + 4*a*b)*sinh(d*x + c)^3 + 2*(5*(a^2 - 4*a*b)*cosh(d*x + c)^3 -
3*(a^2 - 4*a*b)*cosh(d*x + c))*sinh(d*x + c)^2 + (a^2 - 4*a*b)*cosh(d*x + c) + (5*(a^2 - 4*a*b)*cosh(d*x + c)^
4 - 6*(a^2 - 4*a*b)*cosh(d*x + c)^2 + a^2 - 4*a*b)*sinh(d*x + c))*log(cosh(d*x + c) + sinh(d*x + c) - 1) + 2*(
3*b^2*cosh(d*x + c)^5 - 2*(2*a^2 + b^2)*cosh(d*x + c)^3 - (2*a^2 + b^2)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(
d*x + c)^5 + 5*d*cosh(d*x + c)*sinh(d*x + c)^4 + d*sinh(d*x + c)^5 - 2*d*cosh(d*x + c)^3 + 2*(5*d*cosh(d*x + c
)^2 - d)*sinh(d*x + c)^3 + 2*(5*d*cosh(d*x + c)^3 - 3*d*cosh(d*x + c))*sinh(d*x + c)^2 + d*cosh(d*x + c) + (5*
d*cosh(d*x + c)^4 - 6*d*cosh(d*x + c)^2 + d)*sinh(d*x + c))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)**3*(a+b*sinh(d*x+c)**2)**2,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3004 deep

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 125 vs. \(2 (52) = 104\).
time = 0.43, size = 125, normalized size = 2.23 \begin {gather*} \frac {2 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} - \frac {4 \, a^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}}{{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} - 4} + {\left (a^{2} - 4 \, a b\right )} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} + 2\right ) - {\left (a^{2} - 4 \, a b\right )} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} - 2\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*sinh(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/4*(2*b^2*(e^(d*x + c) + e^(-d*x - c)) - 4*a^2*(e^(d*x + c) + e^(-d*x - c))/((e^(d*x + c) + e^(-d*x - c))^2 -
 4) + (a^2 - 4*a*b)*log(e^(d*x + c) + e^(-d*x - c) + 2) - (a^2 - 4*a*b)*log(e^(d*x + c) + e^(-d*x - c) - 2))/d

________________________________________________________________________________________

Mupad [B]
time = 0.67, size = 179, normalized size = 3.20 \begin {gather*} \frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (a^2\,\sqrt {-d^2}-4\,a\,b\,\sqrt {-d^2}\right )}{d\,\sqrt {a^4-8\,a^3\,b+16\,a^2\,b^2}}\right )\,\sqrt {a^4-8\,a^3\,b+16\,a^2\,b^2}}{\sqrt {-d^2}}+\frac {b^2\,{\mathrm {e}}^{c+d\,x}}{2\,d}+\frac {b^2\,{\mathrm {e}}^{-c-d\,x}}{2\,d}-\frac {a^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {2\,a^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sinh(c + d*x)^2)^2/sinh(c + d*x)^3,x)

[Out]

(atan((exp(d*x)*exp(c)*(a^2*(-d^2)^(1/2) - 4*a*b*(-d^2)^(1/2)))/(d*(a^4 - 8*a^3*b + 16*a^2*b^2)^(1/2)))*(a^4 -
 8*a^3*b + 16*a^2*b^2)^(1/2))/(-d^2)^(1/2) + (b^2*exp(c + d*x))/(2*d) + (b^2*exp(- c - d*x))/(2*d) - (a^2*exp(
c + d*x))/(d*(exp(2*c + 2*d*x) - 1)) - (2*a^2*exp(c + d*x))/(d*(exp(4*c + 4*d*x) - 2*exp(2*c + 2*d*x) + 1))

________________________________________________________________________________________